/* 
 * File:   ObjFactory.h
 * Author: mauro
 *
 * Created on 8 de septiembre de 2014, 18:23
 */

#ifndef OBJFACTORY_H
#define	OBJFACTORY_H
#include "SkinFactory.h"
#include "BodyFactoryDynamic.h"
#include "BodyFactoryStatic.h"
#include <Box2D/Box2D.h>
#include "Object.h"
#include "Dot.h"

class ObjFactory {
private:
    b2World *world;
    BodyFactoryDynamic* factoryDynamic; // Box 2D dinamico
    BodyFactoryStatic* factoryStatic; // Box2D estatico
    SkinFactory *skinFactory;
    int pixelWidth;
    int pixelHeight;
    int unitWidth;
    int unitHeight;

public:
    ObjFactory();
    ObjFactory(b2World &world, SDL_Renderer *render, int pixelWidth, int pixelHeight, int unitWidth, int unitHeight);
    SDL_Renderer* getRender();
    Object* getObject(bool flagStatic, b2Vec2 * pos, b2Vec2* size, float scale, float mass, int sides, float rotation);
    Object* getObjectParallellogram(bool flagStatic, b2Vec2 * pos, b2Vec2* size, float alpha, float mass, float rotation);
    Object* getObjectTrapezium(bool flagStatic, b2Vec2 * pos, b2Vec2* size, float alpha, float beta, float mass, float rotation);
    Object* getCharacter(b2Vec2 * pos, b2Vec2* size);
    int getPixelWidth();
    int getPixelHeight();
    int getUnitWidth();
    int getUnitHeight();
    virtual ~ObjFactory();

};

#endif	/* OBJFACTORY_H */

